﻿Imports F = System.Windows.Forms

Public Class Data_Classes
    Private Sub New()
    End Sub


    Public MustInherit Class Base_Data
        <BIS.OLVColumn("Group", Name:="Column_Name", DisplayIndex:=0, Width:=50)>
        Public Property Name As String
        <BIS.OLVColumn("Name", Name:="Column_Name", DisplayIndex:=1, Width:=200)>
        Public Property Group As String

        Public Enum Columns
            Basic
        End Enum


        Public Shared Function Get_Columns(Optional ByVal Columns As Columns = Base_Data.Columns.Basic) As List(Of BIS.OLVColumn)
            Dim MyColumns As List(Of BIS.OLVColumn) = BIS.Generator.GenerateColumns(GetType(Base_Data))

            Select Case Columns
            End Select

            Return MyColumns
        End Function

    End Class


    Public Class GenericDetails
        Inherits Base_Data
        <System.ComponentModel.Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(Drawing.Design.UITypeEditor))>
        Public Property Details As String

        Public Sub New()
        End Sub

        Public Sub New(ByVal Group As String, ByVal Name As String, ByVal Details As String)
            Me.Group = Group
            Me.Name = Name
            Me.Details = Details
        End Sub
    End Class


    Public Class Base_Shortcut
        <BIS.OLVColumn("Group", Name:="Column_Name", DisplayIndex:=0, Width:=50)>
        Public Property Group As String
        <BIS.OLVColumn("Name", Name:="Column_Name", DisplayIndex:=1, Width:=200)>
        Public Property Name As String
        Public Property Location() As String
        <System.ComponentModel.Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(Drawing.Design.UITypeEditor))>
        Public Property Details() As String


        Public Sub New()
        End Sub


        Public Sub New(ByVal Group As String, ByVal Name As String, ByVal Location As String, ByVal Details As String)
            Me.Group = Group
            Me.Name = Name
            Me.Location = Location
            Me.Details = Details
        End Sub

    End Class

    ''' <summary>
    '''
    ''' </summary>
    ''' <remarks>Consider Adding A Group ID to this Class so you can group like Projects</remarks>
    Public Class Reference
        Inherits Base_Shortcut
        Public Enum Actions
            [Nothing]
            CopyString
        End Enum


        Public Property MyProperty() As Actions
            Get
                Return Actions.[Nothing]
            End Get
            Set(ByVal value As Actions)
                Select Case value
                    Case Else
                        Exit Select
                End Select
            End Set
        End Property


        Public Sub New(ByVal Group As String, ByVal Name As String, ByVal Location As String, ByVal Details As String)
            MyBase.New(Group, Name, Location, Details)
        End Sub

        Public Shared Function GetReferences() As List(Of Reference)
            Dim Loc1 As String = "C:\Storage\Visual Studio\"
            Dim Loc2 As String = "C:\Storage\Visual Studio\Shared Objects\"

            Dim List As New List(Of Data_Classes.Reference)()
            List.Add(New Reference("Aaron", "Aaron.Main", Loc2 + "Aaron\Aaron\bin\Debug\Aaron.dll", "No Comments Yet"))
            List.Add(New Reference("Aaron", "Aaron.Main.Database", Loc1 + "Controls\Database\bin\Debug\Database.dll", "No Comments Yet"))
            List.Add(New Reference("Aaron", "Aaron.Helper", Loc1 + "Helpers\bin\Debug\Helpers.dll", "No Comments Yet"))
            List.Add(New Reference("Aaron", "Aaron.Main.Classes", Loc1 + "Controls\ClassLibrary1\bin\Debug\Aaron.Main.Classes.dll", "No Comments Yet"))
            List.Add(New Reference("Aaron", "Aaron.BaseControls", Loc1 + "Controls\BaseControls\bin\Debug\BaseControls.dll", "No Comments Yet"))
            List.Add(New Reference("OLV", "OLV_Con", Loc1 + "Controls\OLV_Con\bin\Debug\OLV_Con.dll", "No Comments Yet"))
            List.Add(New Reference("Folders++", "ExpTree_Demo", Loc1 + "Shared Objects\FolderExplorer_Super\ExpTree_Demo\bin\ExpTree_Demo.dll", "No Comments Yet"))
            List.Add(New Reference("Folders++", "ExpTreeLib", Loc1 + "Shared Objects\FolderExplorer_Super\ExpTreeLib\bin\ExpTreeLib.dll", "No Comments Yet"))
            List.Add(New Reference("zMisc", "FolderExplorer", Loc1 + "Shared Objects\FolderExplorer\FolderExplorer\bin\Debug\FolderExplorer.dll", "No Comments Yet"))

            Return List
        End Function
    End Class

    ''' <summary>
    '''
    ''' </summary>
    Public Class Software
        Inherits Base_Shortcut
        Public Enum Actions
            [Nothing]
            Open
        End Enum


        Public Property MyProperty() As Actions
            Get
                Return Actions.[Nothing]
            End Get
            Set(ByVal value As Actions)
                Select Case value
                    Case Actions.[Nothing]
                        Exit Select
                    Case Actions.Open
                        Try
                            System.Diagnostics.Process.Start(Me.Location)
                        Catch generatedExceptionName As Exception
                            'throw;
                            F.MessageBox.Show("Could not Load " + Me.Name + "/t/t Check the Path for Problems" + "/t" + Me.Location, "Error While Loading", F.MessageBoxButtons.OK)
                        End Try

                        Exit Select
                    Case Else
                        Exit Select
                End Select
            End Set
        End Property

        Public Sub New(ByVal Group As String, ByVal Name As String, ByVal Location As String, ByVal Details As String)
            MyBase.New(Group, Name, Location, Details)
        End Sub

        Public Shared Function GetSoftware() As List(Of Software)
            Dim List As New List(Of Software)()
            List.Add(New Software("SQL", "Database3", "C:\Storage\Software\SQL\Database3.exe", "Analyze Database"))
            List.Add(New Software("SQL", "AccessQueryAnalyzer", "C:\Storage\Software\AccessQueryAnalyzer\AccessQueryAnalyzer.exe", "Run/Test SQL Queries with Timer"))
            List.Add(New Software("SQL", "SQL Parser", "C:\Storage\Software\SQL Parser\TestApp.exe", "Parse SQL Queries + Add Where and OrderBy"))
            List.Add(New Software("SQL", "Database3", "C:\Storage\Software\SQL\Database3.exe", "Analyzes Databases"))
            List.Add(New Software("SQL", "QueryDesignerVB", "C:\Storage\Software\QueryDesignerSource_VB\QueryDesignerVB.exe", "SQL Query Builder With AutoComplete"))


            List.Add(New Software("LINQ", "LINQPad", "C:\Storage\Software\LINQPad4\LINQPad.exe", "Write and Test LINQ Code in Both VB.NET + C#"))
            List.Add(New Software("LINQ", "LINQ Examples", "C:\Storage\Software\LINQ Examples\LinqApp.exe", ""))

            List.Add(New Software("Code Generation", "PseudoLite", "C:\Storage\Software\PseudoCode\PseudoLite.exe", "Generates Code using A Special Syntax" & vbCrLf & vbCrLf & "http://www.codeproject.com/KB/codegen/PseudoCode.aspx"))



            Return List
        End Function
    End Class


    ''' <summary>
    ''' 
    ''' </summary>
    ''' <remarks></remarks>
    Public Class Snippet

#Region "       Properties      >>>"
        Public Enum CodeType
            [Class]
            Method
            Misc
        End Enum

        <BIS.OLVColumn("Group", Name:="Column_Name", DisplayIndex:=0, Width:=50)>
        Public Property Group As String
        <BIS.OLVColumn("Name", Name:="Column_Name", DisplayIndex:=1, Width:=200)>
         Public Property Name As String
        <BIS.OLVColumn("Type", Name:="Column_Type", DisplayIndex:=1, Width:=100)>
        Public Property Type As CodeType
        Public Property Code As String
#End Region


#Region "       New             >>>"

        <DebuggerStepThrough()>
        Sub New()
        End Sub

        <DebuggerStepThrough()>
        Sub New(ByVal Group As String, ByVal Name As String, ByVal Type As CodeType, ByVal Code As String)
            Me.Group = Group
            Me.Name = Name
            Me.Type = Type
            Me.Code = Code


        End Sub

#End Region

    End Class


    Public Class Designers
        Inherits GenericDetails



    End Class


    Public Class VisualStudio
        Inherits GenericDetails

        Public Shared Function GetItems() As List(Of GenericDetails)
            Dim List As New List(Of GenericDetails)

            Dim DV As String = "Folder: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers" & vbCrLf
            DV += "Website: http://www.codeproject.com/KB/vb/AuthoringVisualizers.aspx" & vbCrLf & vbCrLf
            DV += "The Example Explains how to create A Visualizer and then Add the DLL to the Folder to use it"
            List.Add(New GenericDetails("Misc", "Debugger Visualizers", DV))

            Return List
        End Function


    End Class



End Class